
class Output:
    def __init__(self, raw_data=[]):
        self.raw_data = raw_data

    def __file_save(self):
        try:
            with open("result.txt", 'w') as result:
                print("输出结果为：")
                for i in range(len(self.raw_data)):
                    for sentence in self.raw_data[i]:
                        print(sentence)
                        result.writelines(sentence + '\n')
        except Exception as e:
            print(e)

    def run(self):
        self.__file_save()
